#include "gskshaderpaintable.h"
/**
- * SECTION:gskshaderpaintable
- * @Short_description: Drawing with shaders
- * @Title: GskShaderPaintable
- * @see_also: #GdkPaintable
+ * GskShaderPaintable:
*
- * GskShaderPaintable is an implementation of the #GdkPaintable interface
- * that uses a #GskGLShader to create pixels.
+ * `GskShaderPaintable` is an implementation of the `GdkPaintable` interface
+ * that uses a `GskGLShader` to create pixels.
*
* You can set the uniform data that the shader needs for rendering
* using gsk_shader_paintable_set_args(). This function can
*
* Commonly, time is passed to shaders as a float uniform containing
* the elapsed time in seconds. The convenience API
- * gsk_shader_paintable_update_time() can be called from a #GtkTickCallback
+ * gsk_shader_paintable_update_time() can be called from a `GtkTickCallback`
* to update the time based on the frame time of the frame clock.
*/
* pixels. The shader must not require input textures.
* If @data is %NULL, all uniform values are set to zero.
*
- * Returns: (transfer full): a new #GskShaderPaintable
+ * Returns: (transfer full): a new `GskShaderPaintable`
*/
GdkPaintable *
gsk_shader_paintable_new (GskGLShader *shader,
/**
* gsk_shader_paintable_set_shader:
- * @self: a #GskShaderPaintable
- * @shader: the #GskGLShader to use
+ * @self: a `GskShaderPaintable`
+ * @shader: the `GskGLShader` to use
*
* Sets the shader that the paintable will use
* to create pixels. The shader must not require
/**
* gsk_shader_paintable_get_shader:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
*
* Returns the shader that the paintable is using.
*
- * Returns: (transfer none): the #GskGLShader that is used
+ * Returns: (transfer none): the `GskGLShader` that is used
*/
GskGLShader *
gsk_shader_paintable_get_shader (GskShaderPaintable *self)
/**
* gsk_shader_paintable_set_args:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
* @data: Data block with uniform data for the shader
*
* Sets the uniform data that will be passed to the
* shader when rendering. The @data will typically
- * be produced by a #GskUniformDataBuilder.
+ * be produced by a `GskUniformDataBuilder`.
*
* Note that the @data should be considered immutable
* after it has been passed to this function.
/**
* gsk_shader_paintable_get_args:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
*
* Returns the uniform data set with
* gsk_shader_paintable_get_args().
/**
* gsk_shader_paintable_update_time:
- * @self: a #GskShaderPaintable
+ * @self: a `GskShaderPaintable`
* @time_idx: the index of the uniform for time in seconds as float
- * @frame_time: the current frame time, as returned by #GdkFrameClock
+ * @frame_time: the current frame time, as returned by `GdkFrameClock`
*
* This function is a convenience wrapper for
* gsk_shader_paintable_set_args() that leaves all
* index @time_idx, which will be set to the elapsed time
* in seconds, since the first call to this function.
*
- * This function is usually called from a #GtkTickCallback.
+ * This function is usually called from a `GtkTickCallback`.
*/
void
gsk_shader_paintable_update_time (GskShaderPaintable *self,
/**
* gtk_fishbowl_new:
*
- * Creates a new #GtkFishbowl.
+ * Creates a new `GtkFishbowl`.
*
- * Returns: a new #GtkFishbowl.
+ * Returns: a new `GtkFishbowl`.
*/
GtkWidget*
gtk_fishbowl_new (void)
#include <gtk/gtk.h>
-/* This is the function that creates the #GListModel that we need.
- * GTK list widgets need a #GListModel to display, as models support change
+/* This is the function that creates the GListModel that we need.
+ * GTK list widgets need a GListModel to display, as models support change
* notifications.
* Unfortunately various older APIs do not provide list models, so we create
* our own.
GListStore *store;
GList *apps, *l;
- /* We use a #GListStore here, which is a simple array-like list implementation
+ /* We use a GListStore here, which is a simple array-like list implementation
* for manual management.
* List models need to know what type of data they provide, so we need to
- * provide the type here. As we want to do a list of applications, #GAppInfo
+ * provide the type here. As we want to do a list of applications, GAppInfo
* is the object we provide.
*/
store = g_list_store_new (G_TYPE_APP_INFO);
}
/* This is the function we use for setting up new listitems to display.
- * We add just an #GtkImage and a #GtkLabel here to display the application's
+ * We add just an GtkImage and a GtkLabel here to display the application's
* icon and name, as this is just a simple demo.
*/
static void
/* Here we need to prepare the listitem for displaying its item. We get the
* listitem already set up from the previous function, so we can reuse the
- * #GtkImage widget we set up above.
- * We get the item - which we know is a #GAppInfo because it comes out of
+ * GtkImage widget we set up above.
+ * We get the item - which we know is a GAppInfo because it comes out of
* the model we set up above, grab its icon and display it.
*/
static void
* the listitem, but this is simple code, so the default implementations are
* enough. If we had connected signals, this step would have been necessary.
*
- * The #GtkSignalListItemFactory documentation contains more information about
+ * The GtkSignalListItemFactory documentation contains more information about
* this step.
*/
app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
/* Prepare the context for launching the application and launch it. This
- * code is explained in detail in the documentation for #GdkAppLaunchContext
- * and #GAppInfo.
+ * code is explained in detail in the documentation for GdkAppLaunchContext
+ * and GAppInfo.
*/
context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (list)));
if (!g_app_info_launch (app_info,
gtk_window_set_title (GTK_WINDOW (window), "Application Launcher");
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
- /* The #GtkListitemFactory is what is used to create #GtkListItems
+ /* The GtkListitemFactory is what is used to create GtkListItems
* to display the data from the model. So it is absolutely necessary
* to create one.
- * We will use a #GtkSignalListItemFactory because it is the simplest
+ * We will use a GtkSignalListItemFactory because it is the simplest
* one to use. Different ones are available for different use cases.
- * The most powerful one is #GtkBuilderListItemFactory which uses
- * #GtkBuilder .ui files, so it requires little code.
+ * The most powerful one is GtkBuilderListItemFactory which uses
+ * GtkBuilder .ui files, so it requires little code.
*/
factory = gtk_signal_list_item_factory_new ();
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
*/
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
- /* List widgets should always be contained in a #GtkScrolledWindow,
+ /* List widgets should always be contained in a GtkScrolledWindow,
* because otherwise they might get too large or they might not
* be scrollable.
*/